import sys
file1=open(sys.argv[1],'r')

for line in file1:
    line_list=line.strip().split('\t')
    num1=line_list[4:9].count('-')
    num2=line_list[9:].count('-')
    # if num1==5 or num2==5:
    #     continue
    if num1+num2>5:
        continue
    print(line.strip())
    # sys.exit()